package com.cloudkinto.service.order.vo.shopify;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author zhujiale
 * @description shopify接口请求参数体 非驼峰
 * @date 2022/3/1
 */
@NoArgsConstructor
@Data
public class AddFulfillmentReqParams {

    @JsonProperty("message")
    private String message;
    @JSONField(name = "notify_customer")
    private Boolean notifyCustomer;
    @JSONField(name = "tracking_info")
    private TrackingInfoDTO trackingInfo;
    @JSONField(name = "line_items_by_fulfillment_order")
    private List<LineItemsByFulfillmentOrderDTO> lineItemsByFulfillmentOrder;

    @NoArgsConstructor
    @Data
    public static class TrackingInfoDTO {
        @JsonProperty("number")
        private String number;
        @JsonProperty("url")
        private String url;
        @JsonProperty("company")
        private String company;
    }

    @NoArgsConstructor
    @Data
    public static class LineItemsByFulfillmentOrderDTO {
        @JSONField(name = "fulfillment_order_id")
        private Long fulfillmentOrderId;
        @JSONField(name = "fulfillment_order_line_items")
        private List<FulfillmentOrderLineItemsDTO> fulfillmentOrderLineItems;

        @NoArgsConstructor
        @Data
        public static class FulfillmentOrderLineItemsDTO {
            @JsonProperty("id")
            private Long id;
            @JsonProperty("quantity")
            private Integer quantity;
        }
    }
}
